package com.hllxd.hism.star.basic.service.dao.mapper.mis;


import com.hllxd.hism.star.basic.service.model.cost.CostReportEntity;
import com.hllxd.hism.star.basic.service.model.DashboardEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 个人看板
 *
 * @author lixiyong
 * @date 2021/6/02 18:15
 */

@Mapper
public interface DashboardMapper {

    /**
     * 查看YARN队列的任务
     *
     * @param ownerID 负责人
     * @param ptdate  报告时间
     * @return 报告列表
     */
    List<CostReportEntity> queryYarnQueue(@Param("ownerID") String ownerID, @Param("ptdate") String ptdate);

    /**
     * 查看HDFS的表个数
     *
     * @param ownerID 负责人
     * @param ptdate  报告时间
     * @return 报告列表
     */
    List<CostReportEntity> queryHdfsTable(@Param("ownerID") String ownerID, @Param("ptdate") String ptdate);

    /**
     * 根据类型查询所有dashboard信息
     *
     * @param dashboardType dashboard类型
     * @return dashboard列表
     */
    List<DashboardEntity> loadDashboard(@Param("dashboardType") String dashboardType);

    Long insertDashboard(DashboardEntity entity);

    Long updateDashboard(DashboardEntity entity);

    DashboardEntity getDashboard(@Param("id") Long id);
}
